<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // number string boolean undefined null
       

        var num = 10; //+ - * / %
        num = num + 100;
        num += 10; // *=  -=  /=
        num = num + 1;
        num += 1; 
        num++;
        ++num;
        console.log(num); //124
        console.log(num++); //124
        console.log(num); //125
        console.log(++num); //126

        var str = "aaa";
        str = str + 12;
        console.log(str); //aaa12
        str = "12";
        console.log(str + 12); //1212
        console.log(str - 10); //2  - * / % 都会进行隐式类型转换

        str = "a12";
        console.log(str - 10); //nan 


         // array object

         var arr = [];
         arr[0] = "aaa";
         arr[0] = "bbb";
         console.log(arr[0]);

         arr = [12,"aaa",true,[12,23,34]];

         arr = ["aaa","班长"]

         arr = ["a","b","c","d"];


         var obj = {
            name:"lili",
            age:18,
            sex:true,
            arr:["aa","bb","cc"]
         }
         obj.phone = 1671267126;
         obj["email"] = "22@qq.com";

         obj.name = "张三";

         delete obj.sex;

         console.log(obj.age);
         console.log(obj["age"]);
         for(var key in obj){
            console.log(key); //直系属性名 
            // console.log(obj.key); //undefined
            console.log(obj[key]); //
         }





    </script>
</body>
</html>